/**
 * Created by huxia on 2016/12/9.
 */
var Payment = require('./db')['payment'];

Payment.findById = function(pay_id) {
	return Payment.findOne({where:{id:pay_id}});
};

Payment.findByUser = function(user_id) {
	return Payment.findAll({
		where:{
			user_id:user_id
		}
	});
};

module.exports = Payment;